<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

/**
 * 用户模块 相关路由
 */
Route::group('user', function () {
    /**************************************用户相关******************************************************/
    //用户登录
    Route::post('login', 'v1.user.user/login');
    //获取用户信息
    Route::post('info', 'v1.user.user/info');
    //退出登录
    Route::post('logout', 'v1.user.user/logout');
    //获取管理员列表
    Route::post('getList', 'v1.user.user/getList');
    //获取编辑表单
    Route::post('getUserForm', 'v1.user.user/getUserForm');
    //设置表单内容
    Route::post('setUserForm', 'v1.user.user/setUserForm');

    //获取钱包编辑表单
    Route::post('getUserWalletForm', 'v1.user.user/getUserWalletForm');
    //设置钱包表单内容
    Route::post('setUserWalletForm', 'v1.user.user/setUserWalletForm');

    //删除用户
    Route::post('delete', 'v1.user.user/delete');
    //获取权限表单
    Route::post('getUserAddonAuthForm', 'v1.user.user/getUserAddonAuthForm');
    //获取权限表单
    Route::post('setUserAddonAuth', 'v1.user.user/setUserAddonAuth');
    /**************************************权限相关******************************************************/

    //用户组路由
    Route::resource("UserGroup", "v1.user.UserGroup");

    Route::post('UserGroup/getList', 'v1.user.UserGroup/index');
    Route::post('UserGroup/getForm', 'v1.user.UserGroup/read');
    Route::post('UserGroup/save', 'v1.user.UserGroup/save');
    Route::post('UserGroup/update', 'v1.user.UserGroup/update');
    Route::post('UserGroup/delete', 'v1.user.UserGroup/delete');

    //子账号权限
    Route::rule('UserPermission/:action', 'v1.user.UserPermission/:action');
    //TODO 待实现

})->middleware([

]);
